
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<link rel="stylesheet" type="text/css" href="<s:url value="/css/style.css"/>"/> 
<div class="header">
    <div style="float:left; clear: both;">
        <span> <a href="
                  <s:url action="index" />
                  " > Trang chủ</a></span>
    </div>
    <s:if test="%{#session.user == null}" >
        <div class="login">
            <s:form action="doLogin" >
                <span>
                    <label>Tên đăng nhập:</label>
                    <input name="userProfile.username" size="25" />
                </span>
                <span>
                    <label>Mật khẩu:</label>
                    <input name="userProfile.password" type="password" />
                </span>
                <span>
                    <input type="submit" value="Đăng nhập" class="login_submit" />
                </span>
            </s:form>
        </div>
        <div class="registry">
            <a href="<s:url action="Registry"/>">Đăng ký</a> 
        </div>
    </s:if>     <s:else>
        <ul>
            <div class="profile">
                <li style="float:left; ">
                    <a href="" ><img  src="/QAWeb/images/avatar.jpg" width="40" height="40" />
                        <s:property value="%{#session.user.username}" /></a> &nbsp; &nbsp; &nbsp;
                </li>
                <li style="float:left;">
                    <a href="<s:url action="doLogout"/>">Đăng xuất</a> 
                </li>
            </div>
        </ul>
    </s:else>

</div>